Configure NIS Client
2015/01/13 |
Configure on NIS clients. |
[root@www ~]#
yum -y install ypbind
[root@www ~]#
vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no HOSTNAME=www.srv.world # add follows to the end NISDOMAIN=srv.world
[root@www ~]#
vi /etc/sysconfig/authconfig
USENIS=
yes # lien 21: change
[root@www ~]#
vi /etc/yp.conf # add follows to the end ( [domain name] server [NIS server] ) domain srv.world server dir.srv.world
[root@www ~]#
vi /etc/nsswitch.conf
passwd:
files nis # line 33: add shadow: files nis # add group: files nis # add hosts: files dns nis # add # add optionally if you need ( create home directory automatically if it's none ) [root@www ~]# vi /etc/pam.d/system-auth # add follows to the end session optional pam_mkhomedir.so skel=/etc/skel umask=077 redhat # NIS user Password: # NIS password Creating directory '/home/redhat'. [redhat@www ~]$ # just logined [redhat@www ~]$ dlp.srv.world [rhel5@www ~]$ ypcat passwd cent:x:500:500::/home/cent:/bin/bash redhat:x:501:501::/home/redhat:/bin/bash [redhat@www ~]$ ypcat hosts 127.0.0.1 localhost.localdomain localhost 127.0.0.1 localhost.localdomain localhost 10.0.0.30 dlp.srv.world dlp 10.0.0.30 dlp.srv.world dlp [redhat@www ~]$ # try to change NIS password Changing NIS account information for redhat on dlp.srv.world. Please enter old password: # current password Changing NIS password for redhat on dlp.srv.world. Please enter new password: # new password
Please retype new password:
The NIS password has been changed on dlp.srv.world.[redhat@www ~]$ # just changed |